#pragma once
namespace WOW
{
    enum {
        LIGHT_AMBIENT,
        LIGHT_DYNAMIC,
        LIGHT_MODEL_ONLY
    };

    enum {
        LIGHT_POSITIONAL,
        LIGHT_SPOT,
        LIGHT_DIRECTIONAL
    };

    enum ModelType {
        MT_NORMAL,
        MT_CHAR,
        MT_WMO,
        MT_NPC
    };

    enum CharRegions {
        CR_BASE = 0,
        CR_ARM_UPPER,
        CR_ARM_LOWER,
        CR_HAND,
        CR_FACE_UPPER,
        CR_FACE_LOWER,
        CR_TORSO_UPPER,
        CR_TORSO_LOWER,
        CR_PELVIS_UPPER,
        CR_PELVIS_LOWER,
        CR_FOOT,
        NUM_REGIONS,

        CR_LEG_UPPER = CR_PELVIS_UPPER,
        CR_LEG_LOWER = CR_PELVIS_LOWER
    };

    enum {
        UPDATE_ITEM,
        UPDATE_SET,
        UPDATE_START,
        UPDATE_MOUNT,
        UPDATE_CREATURE_ITEM,
        UPDATE_NPC,
        UPDATE_NPC_START,
        UPDATE_SINGLE_ITEM
    };

    enum CharSlots {
        CS_HEAD,
        CS_NECK,
        CS_SHOULDER,
        CS_BOOTS,
        CS_BELT,
        CS_SHIRT,
        CS_PANTS,
        CS_CHEST,
        CS_BRACERS,
        CS_GLOVES,
        CS_HAND_RIGHT,
        CS_HAND_LEFT,
        CS_CAPE,
        CS_TABARD,
        CS_QUIVER,

        NUM_CHAR_SLOTS
    };

    enum CharGeosets {
        CG_HAIRSTYLE,
        CG_GEOSET100,
        CG_GEOSET200,
        CG_GEOSET300,
        CG_GLOVES,
        CG_BOOTS, // 5
        CG_EARS = 7,
        CG_WRISTBANDS,
        CG_KNEEPADS,
        CG_PANTS, // 10
        CG_PANTS2,
        CG_TARBARD,
        CG_TROUSERS,
        CG_CAPE = 15, // 15
        CG_EYEGLOW = 17,
        CG_BELT,

        NUM_GEOSETS
    };

    enum EyeGlowTypes {
        EGT_NONE = 0,
        EGT_DEFAULT,
        EGT_DEATHKNIGHT
    };

    // Item type values as referred to by the items.csv list
    enum ItemTypes {
        IT_ALL = 0,
        IT_HEAD,
        IT_NECK,
        IT_SHOULDER,
        IT_SHIRT,
        IT_CHEST,
        IT_BELT,
        IT_PANTS,
        IT_BOOTS,
        IT_BRACERS,
        IT_GLOVES,
        IT_RINGS,
        IT_ACCESSORY,
        IT_DAGGER,
        IT_SHIELD,
        IT_BOW,
        IT_CAPE,
        IT_2HANDED,
        IT_QUIVER,
        IT_TABARD,
        IT_ROBE,
        IT_RIGHTHANDED, // IT_CLAW
        IT_LEFTHANDED, // IT_1HANDED
        IT_OFFHAND, // HOLDABLE
        IT_AMMO, // unused?
        IT_THROWN,
        IT_GUN,
        IT_UNUSED,
        IT_RELIC,

        NUM_ITEM_TYPES
    };

    enum {
        CHECK_RANDOMSKIN,
        CHECK_HIDEHELMET,
        CHECK_SHOWPARTICLE,
        CHECK_ZEROPARTICLE,
        CHECK_LOCALFILES,
        CHECK_ALTERNATE,

        NUM_SETTINGS1_CHECK
    };

    enum {
        CHECK_COMPRESSEDTEX,
        CHECK_MULTITEX,
        CHECK_VBO,
        CHECK_FBO,
        CHECK_PBO,
        CHECK_DRAWRANGEELEMENTS,
        CHECK_ENVMAPPING,
        CHECK_NPOT,
        CHECK_PIXELSHADERS,
        CHECK_VERTEXSHADERS,
        CHECK_GLSLSHADERS,

        NUM_SETTINGS2_CHECK
    };

    // Model Export Options
    // General (Page 1)
    enum {
        MEO_CHECK_PRESERVE_DIR,
        MEO_CHECK_USE_WMV_POSROT,
        MEO_CHECK_SCALE_TO_REALWORLD,

        NUM_MEO1_CHECK
    };
    // Lightwave (Page 2)
    enum {
        MEO_CHECK_PRESERVE_LWDIR,
        MEO_CHECK_LW_ALWAYSWRITESCENEFILE,
        MEO_CHECK_LW_EXPORTLIGHTS,
        MEO_CHECK_LW_EXPORTDOODADS,
        MEO_CHECK_LW_EXPORTCAMERAS,
        MEO_CHECK_LW_EXPORTBONES,

        NUM_MEO2_CHECK
    };
    // X3D (Page 3)
    enum {
        MEO_CHECK_EXPORT_ANIMATION,
        MEO_CHECK_CENTER_MODEL,

        NUM_MEO3_CHECK
    };

    // End Model Export Options
    enum {
        SPIN_SKIN_COLOR,
        SPIN_FACE_TYPE,
        SPIN_HAIR_COLOR,
        SPIN_HAIR_STYLE,
        SPIN_FACIAL_HAIR,
        SPIN_FACIAL_COLOR,

        NUM_SPIN_BTNS
    };

    enum {
        SPIN_TABARD_ICON = 0,
        SPIN_TABARD_ICONCOLOR,
        SPIN_TABARD_BORDER,
        SPIN_TABARD_BORDERCOLOR,
        SPIN_TABARD_BACKGROUND,

        NUM_TABARD_BTNS
    };

    /*
    enum WOW_LOCALE {
    enUS = 0,
    koKR,
    frFR,
    deDE,
    zhCN,
    zhTW,
    esES,
    esMX,
    ruRU,

    NUM_LOCALES = 16
    };
    */

    // copied from the .mdl docs? this might be completely wrong
    /*
    Blending mode
    Value	 Mapped to	 Meaning
    0	 0	 Combiners_Opaque
    1	 1	 Combiners_Mod
    2	 1	 Combiners_Decal
    3	 1	 Combiners_Add
    4	 1	 Combiners_Mod2x
    5	 4	 Combiners_Fade
    6	 4	 Used in the Deeprun Tram subway glass, supposedly (src=dest_color, dest=src_color) (?)
    */
    enum BlendModes {
        BM_OPAQUE,
        BM_TRANSPARENT,
        BM_ALPHA_BLEND,
        BM_ADDITIVE,
        BM_ADDITIVE_ALPHA,
        BM_MODULATE,
        BM_MODULATEX2
    };

    enum KeyBoneTable { // string Bone_Names[]
        //Block F - Key Bone lookup table.
        //---------------------------------
        BONE_LARM = 0,		// 0, ArmL: Left upper arm
        BONE_RARM,			// 1, ArmR: Right upper arm
        BONE_LSHOULDER,		// 2, ShoulderL: Left Shoulder / deltoid area
        BONE_RSHOULDER,		// 3, ShoulderR: Right Shoulder / deltoid area
        BONE_STOMACH,		// 4, SpineLow: (upper?) abdomen
        BONE_WAIST,			// 5, Waist: (lower abdomen?) waist
        BONE_HEAD,			// 6, Head
        BONE_JAW,			// 7, Jaw: jaw/mouth
        BONE_RFINGER1,		// 8, IndexFingerR: (Trolls have 3 "fingers", this points to the 2nd one.
        BONE_RFINGER2,		// 9, MiddleFingerR: center finger - only used by dwarfs.. don't know why
        BONE_RFINGER3,		// 10, PinkyFingerR: (Trolls have 3 "fingers", this points to the 3rd one.
        BONE_RFINGERS,		// 11, RingFingerR: Right fingers -- this is -1 for trolls, they have no fingers, only the 3 thumb like thingys
        BONE_RTHUMB,		// 12, ThumbR: Right Thumb
        BONE_LFINGER1,		// 13, IndexFingerL: (Trolls have 3 "fingers", this points to the 2nd one.
        BONE_LFINGER2,		// 14, MiddleFingerL: Center finger - only used by dwarfs.
        BONE_LFINGER3,		// 15, PinkyFingerL: (Trolls have 3 "fingers", this points to the 3rd one.
        BONE_LFINGERS,		// 16, RingFingerL: Left fingers
        BONE_LTHUMB,		// 17, ThubbL: Left Thumb
        BONE_BTH,			// 18, $BTH: In front of head
        BONE_CSR,			// 19, $CSR: Left hand
        BONE_CSL,			// 20, $CSL: Left hand
        BONE_BREATH,		// 21, _Breath
        BONE_NAME,			// 22, _Name
        BONE_NAMEMOUNT,		// 23, _NameMount
        BONE_CHD,			// 24, $CHD: Head
        BONE_CCH,			// 25, $CCH: Bust
        BONE_ROOT,			// 26, Root: The "Root" bone,  this controls rotations, transformations, etc of the whole model and all subsequent bones.
        BONE_WHEEL1,		// 27, Wheel1
        BONE_WHEEL2,		// 28, Wheel2
        BONE_WHEEL3,		// 29, Wheel3
        BONE_WHEEL4,		// 30, Wheel4
        BONE_WHEEL5,		// 31, Wheel5
        BONE_WHEEL6,		// 32, Wheel6
        BONE_WHEEL7,		// 33, Wheel7
        BONE_WHEEL8,		// 34, Wheel8
        BONE_MAX
    };

    enum GRAPHIC_EFFECTS {
        FRAGMENT_SHADER,
        VERTEX_SHADER,
        GLSL,
        COMPRESSED_TEXTURES,
        MULTI_TEXTURES,
        DRAW_RANGE_ELEMENTS,
        POINT_SPRITES,
        //bool supportShaders;//  = false;
        ANTI_ALIAS,
        VERTEX_BUFFER,
        PIXEL_BUFFER,
        FRAME_BUFFER,
        NON_POWEROFTWO,
        OPENGL_20,
        WGLPIXELFORMAT,

        NUM_EFFECTS
    };

    enum POSITION_SLOTS { // string Attach_Names[]
        ATT_LEFT_WRIST = 0, // Mountpoint
        ATT_RIGHT_PALM,
        ATT_LEFT_PALM,
        ATT_RIGHT_ELBOW,
        ATT_LEFT_ELBOW,
        ATT_RIGHT_SHOULDER, // 5
        ATT_LEFT_SHOULDER,
        ATT_RIGHT_KNEE,
        ATT_LEFT_KNEE,
        ATT_RIGHT_HIP,
        ATT_LEFT_HIP, // 10
        ATT_HELMET,
        ATT_BACK,
        ATT_RIGHT_SHOULDER_HORIZONTAL,
        ATT_LEFT_SHOULDER_HORIZONTAL,
        ATT_BUST, // 15
        ATT_BUST2,
        ATT_FACE,
        ATT_ABOVE_CHARACTER,
        ATT_GROUND,
        ATT_TOP_OF_HEAD, // 20
        ATT_LEFT_PALM2,
        ATT_RIGHT_PALM2,
        ATT_PRE_CAST_2L,
        ATT_PRE_CAST_2R,
        ATT_PRE_CAST_3, // 25
        ATT_RIGHT_BACK_SHEATH,
        ATT_LEFT_BACK_SHEATH,
        ATT_MIDDLE_BACK_SHEATH,
        ATT_BELLY,
        ATT_LEFT_BACK, // 30
        ATT_RIGHT_BACK,
        ATT_LEFT_HIP_SHEATH,
        ATT_RIGHT_HIP_SHEATH,
        ATT_BUST3, // Spell Impact
        ATT_PALM3, // 35
        ATT_RIGHT_PALM_UNK2,
        ATT_DEMOLISHERVEHICLE,
        ATT_DEMOLISHERVEHICLE2,
        ATT_VEHICLE_SEAT1,
        ATT_VEHICLE_SEAT2, // 40
        ATT_VEHICLE_SEAT3,
        ATT_VEHICLE_SEAT4
    };

    enum TextureFlags {
        TEXTURE_WRAPX=1,
        TEXTURE_WRAPY
    };

    enum ModelLightTypes {
        MODELLIGHT_DIRECTIONAL=0,
        MODELLIGHT_POINT
    };

#define	UPPER_BODY_BONES	5

    enum Gender
    {
        GENDER_MALE                        = 0,
        GENDER_FEMALE                      = 1,
        GENDER_NONE                        = 2
    };

    // Race value is index in ChrRaces.dbc
    enum Races
    {
        RACE_HUMAN              = 1,
        RACE_ORC                = 2,
        RACE_DWARF              = 3,
        RACE_NIGHTELF           = 4,
        RACE_UNDEAD             = 5,
        RACE_TAUREN             = 6,
        RACE_GNOME              = 7,
        RACE_TROLL              = 8,
        RACE_GOBLIN             = 9,
        RACE_BLOODELF           = 10,
        RACE_DRAENEI            = 11,
        RACE_FEL_ORC            = 12,
        RACE_NAGA               = 13,
        RACE_BROKEN             = 14,
        RACE_SKELETON           = 15,
        RACE_VRYKUL             = 16,
        RACE_TUSKARR            = 17,
        RACE_FOREST_TROLL       = 18,
        RACE_TAUNKA             = 19,
        RACE_NORTHREND_SKELETON = 20,
        RACE_ICE_TROLL          = 21,
        RACE_WORGEN             = 22
    };


    // Class value is index in ChrClasses.dbc
    // Matches ID of website's API
    enum Classes
    {
        CLASS_WARRIOR       = 1,
        CLASS_PALADIN       = 2,
        CLASS_HUNTER        = 3,
        CLASS_ROGUE         = 4,
        CLASS_PRIEST        = 5,
        CLASS_DEATH_KNIGHT  = 6,
        CLASS_SHAMAN        = 7,
        CLASS_MAGE          = 8,
        CLASS_WARLOCK       = 9,
        CLASS_DRUID         = 11,
    };

    /*
    enum ItemQualities
    {
    ITEM_QUALITY_POOR                  = 0,                 //GREY
    ITEM_QUALITY_NORMAL                = 1,                 //WHITE
    ITEM_QUALITY_UNCOMMON              = 2,                 //GREEN
    ITEM_QUALITY_RARE                  = 3,                 //BLUE
    ITEM_QUALITY_EPIC                  = 4,                 //PURPLE
    ITEM_QUALITY_LEGENDARY             = 5,                 //ORANGE
    ITEM_QUALITY_ARTIFACT              = 6,                 //LIGHT YELLOW
    ITEM_QUALITY_HEIRLOOM              = 7
    };
    */

    enum SheathTypes
    {
        SHEATHETYPE_NONE                   = 0,
        SHEATHETYPE_MAINHAND               = 1,
        SHEATHETYPE_LARGEWEAPON            = 2,
        SHEATHETYPE_HIPWEAPON              = 3,
        SHEATHETYPE_SHIELD                 = 4
    };

    enum Version
    {
        VERSION_WOTLK = 30000,
        VERSION_CATACLYSM = 40000,
        VERSION_MOP = 50000
    };
}